<template>
  <div class="custom-body" :style="borderStyle">
    <el-empty v-if="dataList === null || dataList.length === 0" class="custom-right" :image-size="100" />
    <div v-else class="custom-right" :style="bodyStyle">
      <div v-for="(item,index) in dataList" :key="'li-'+index" class="custom-ul-li" :style="liStyle">
        <div
          class="custom-ul-body"
          :style="{
            boxShadow: '0 2px 7px 0px '+ item.backColorA,
            background: 'linear-gradient(0deg,'+item.backColorA+','+item.backColorB+')' }"
        >
          <div class="custom-li-image">
            <el-image class="li-image" :src="baseURL+item.tb" />
          </div>
          <div class="custom-li-right">
            <div class="custom-li-line" @click="callStatisticsBack(item)">
              <span class="left" :style="{ color: item.titleColor, fontSize: item.titleFontSize + 'px' }">{{ item.label }}</span>
              <span class="right" :style="{ color: item.fontColor, fontSize: item.fontSize + 'px',fontWeight: '600' }">
                <statistics-slot :ids="item.sjly.id" :column="item.number" />
              </span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import StatisticsSlot from './slot/statistics'
import { mobile } from '@/mixins/mobile'
export default {
  name: 'AppStatisticsV1',
  components: { StatisticsSlot },
  mixins: [mobile({ tabs: 'statistics' })]
}
</script>

<style scoped>
.custom-body {
  width: 100%;
  height: 100%;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}
.custom-right {
  width: 100%;
  height: 100%;
  position: relative;
  overflow-x: hidden;
}
.custom-ul-li {
  width: 100%;
  box-sizing: border-box;
  height: 60px;
  padding: 5px ;
}
.custom-ul-body{
  width: 100%;
  height: 100%;
  border-radius: 4px;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-flow: row nowrap;
}
.custom-li-image {
  flex: 0 1 auto;
  width: 60px;
  text-align: center;
}
.li-image {
  width: 40px;
  margin-top: 5px;
}
.custom-li-right {
  flex: 1 1 auto;
  height: 100%;
  box-sizing: border-box;
  position: relative;
}
.custom-li-line {
  width: 100%;
  height: 100%;
  display: flex;
  flex-flow: row nowrap;
  line-height: 50px;
}
.custom-li-line span{
  width: 100%;
  height: 100%;
  line-height: 50px;
  text-align: center;
  padding: 0px 5px;
  box-sizing: border-box;
}
.custom-li-line span.left {
  text-align: left;
}
.custom-li-line span.right {
  text-align: right;
  padding-right: 15px;
  box-sizing: border-box;
}
</style>
